package com.engineering.elink.dao;

import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.co.UserCo;
import com.engineering.elink.domain.User;

public interface UserMapper {
	int deleteByPrimaryKey(String userId);

	int insert(User record);

	// 需求
	int insertSelective(UserCo UserCo);

	User selectByPrimaryKey(String userId);

	int updateByPrimaryKeySelective(User record);

	int updateByPrimaryKey(User record);
	
	int updateCoinValueByUserId (@Param("userId") String userId, @Param("coinValue") int coinValue);

	User selectByEmail(String email);

	User selectByPhone(String phone);
	
	int insertRegInfo (UserCo userCo);
	
	User selectByAccountAndPasswd (@Param("userType") int userType, @Param("account") String account, @Param("passwd") String passwd);
	
	Map<String,Object> selectByUserId (String userId);
	
	User selectByEmailAndPasswd (@Param("userType") int userType, @Param("email") String email, @Param("passwd") String passwd);
	
	Map<String,Object> selectBaseUserInfoByUserId (@Param("user") User user);
	
	int updateInfo (UserCo UserCo);
	
	Map<String,Object> selectInfo (@Param("userId")String userId,@Param("passwd") String passwd);
}